package com.devunion.salon.client.app.bean;

import com.extjs.gxt.ui.client.data.BaseTreeModel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


/**
 * @author Timoshenko Alexander 01.03.2009 : 11:00:17
 */
public class CountryBeanModel extends BaseTreeModel implements Serializable {

    public CountryBeanModel() {
    }

    public CountryBeanModel(String code, String value) {
        setCode(code);
        setValue(value);
        setStates(new ArrayList<StateBeanModel>());
    }

    public CountryBeanModel(String code, String value, List<StateBeanModel> states) {
        setCode(code);
        setValue(value);
        setStates(states);
    }
    
    public List<StateBeanModel> getStates() {
        return get("states");
    }

    public void setStates(List<StateBeanModel> states) {
        set("states", states);
    }

    public String getCode() {
        return get("code");
    }

    public void setCode(String code) {
        set("code", code);
    }

    public String getValue() {
        return get("value");
    }

    public void setValue(String value) {
        set("value", value);
    }
}
